package com.ourteam.education.domain;
/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Nov 30 16:49:33 CST 2018
 * Auto Generate Date : 2019-09-22 15:15:17
  * Warning ! This file will be overwrite when regenerate !
  * 
 */

import java.util.Map;
import java.util.HashMap;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.beanutils.BeanMap;
import net.dao.IDataPopulateCallback;


public class CourseTypeBean implements java.io.Serializable {

        
	private static Map<String,String> mappedDaoFields = new HashMap<String,String>();
    
	private com.ourteam.education.dao.CourseType courseType;

	protected BeanMap getBeanMap(){
	
		return new BeanMap(courseType);
	}
	
	static{
				
												
		mappedDaoFields.put("id",com.ourteam.education.dao.ICourseTypeDAO.Id);
		
																						
				
																
		mappedDaoFields.put("courseTypeName",com.ourteam.education.dao.ICourseTypeDAO.CourseTypeName);
		
																		
				
																				
		mappedDaoFields.put("status",com.ourteam.education.dao.ICourseTypeDAO.Status);
		
														
				
																								
		mappedDaoFields.put("remarks",com.ourteam.education.dao.ICourseTypeDAO.Remarks);
		
										
				
				
	}
	
	public static String getMappedDAOField(String aAttrName){
		return mappedDaoFields.get(aAttrName);
	}
	
	
	public CourseTypeBean() {
		super();
	    		
		this.courseType = new com.ourteam.education.dao.CourseType();
                
	}
	
		
	public CourseTypeBean(com.ourteam.education.dao.CourseType courseType) {
		super();
	
		this.courseType = courseType;
		
	}
		
		
		
    	
	public com.ourteam.education.dao.CourseType convertToCourseType(){
		return this.courseType;
	}
	
	public com.ourteam.education.dao.CourseType convertTo(){
		return this.courseType;
	}
	
			
		
			
			
		
	/**
	 * Get id
	 * 
	 * @return long
	 */
	public long getId(){
		return (long) this.courseType.getId();
	}
	
	/**
	 * Set id
	 * 
	 * @parameter long
	 */
	public void setId(long id){
		
		this.courseType.setId(id);
	}
		
											
		
		
					
			
		
	/**
	 * Get courseTypeName
	 * 
	 * @return String
	 */
	public String getCourseTypeName(){
		return (String) this.courseType.getCourseTypeName();
	}
	
	/**
	 * Set courseTypeName
	 * 
	 * @parameter String
	 */
	public void setCourseTypeName(String courseTypeName){
		
		this.courseType.setCourseTypeName(courseTypeName);
	}
		
									
		
		
							
			
		
	/**
	 * Get status
	 * 
	 * @return String
	 */
	public String getStatus(){
		return (String) this.courseType.getStatus();
	}
	
	/**
	 * Set status
	 * 
	 * @parameter String
	 */
	public void setStatus(String status){
		
		this.courseType.setStatus(status);
	}
		
							
		
		
									
			
		
	/**
	 * Get remarks
	 * 
	 * @return String
	 */
	public String getRemarks(){
		return (String) this.courseType.getRemarks();
	}
	
	/**
	 * Set remarks
	 * 
	 * @parameter String
	 */
	public void setRemarks(String remarks){
		
		this.courseType.setRemarks(remarks);
	}
		
					
		
			
			
			
			
			
			
	
	public int hashCode() {
   		return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
 	}
	
		
	public boolean equals(Object obj) {
		if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof CourseTypeBean) == false) {
            return false;
        } // end if

        CourseTypeBean other = (CourseTypeBean) obj;
        
        boolean isEqual = false;
        
                
        com.ourteam.education.dao.CourseType tempCourseType = other.convertToCourseType();
        
        if(tempCourseType == null || this.courseType == null){
        	isEqual = false;
        }
        else if(tempCourseType == this.courseType || tempCourseType.equals(this.courseType) ){
        	isEqual = true;
        }
        else{
        	isEqual = false;
        }
        
        return isEqual;
	}
	
	
	public static CourseTypeBean[] toArray(com.ourteam.education.dao.CourseType[] aCourseTypes){
		
		return toArray(aCourseTypes,null);
	}
	
	public static CourseTypeBean[] toArray(com.ourteam.education.dao.CourseType[] aCourseTypes , IDataPopulateCallback aCallBack){
		 
		 if(ArrayUtils.isEmpty(aCourseTypes)){
		 	return new CourseTypeBean[0];
		 }
		 
		 int length = aCourseTypes.length;
		 
		 CourseTypeBean[] beans = new CourseTypeBean[length];
		  
		 for (int i = 0; i < length; i++) {
			beans[i] = new CourseTypeBean(aCourseTypes[i]);
			if(aCallBack != null){
			    aCallBack.populate(beans[i],new Object[]{aCourseTypes[i]});
			}
		 }
		 
		 return beans;
	 }
	 
	 	 
}